import { request, METHOD } from '@/utils/request'
import { 
    REFRESH, 
    BATCHSENDTRANSTION, REDEEMMILL,BATCHREDEEMILL,GETBLOCKPLANLIST,ROLLBACKBLOCK,
    PLEDGEMILL, BATCHSETMILLFEE, BATCHUPDATEPWD, PLEDGELIST,DELBLOCKPLAN,
    RESETMILL, DEBLOCKMILL, TRADELIST, SETMILLPARAMS, GETMILLPORTCONFIGLIST,
    SENDQUOTATRANSTION, SETUPATH
} from './api'

export async function refresh(params) {
    return request(REFRESH, METHOD.POST, params)
}

export async function batchSendTranstion(params) {
    return request(BATCHSENDTRANSTION, METHOD.POST, params)
}

export async function pledgeMill(params) {
    return request(PLEDGEMILL, METHOD.POST, params)
}

export async function batchSetMillFee(params) {
    return request(BATCHSETMILLFEE, METHOD.POST, params)
}

export async function batchUpdatePwd(params) {
    return request(BATCHUPDATEPWD, METHOD.POST, params)
}

export async function pledgeList(params) {
    return request(PLEDGELIST, METHOD.POST, params)
}

export async function resetMill(params) {
    return request(RESETMILL, METHOD.POST, params)
}

export async function deBlockMill(params) {
    return request(DEBLOCKMILL, METHOD.POST, params)
}

export async function tradeList(params) {
    return request(TRADELIST, METHOD.POST, params)
}

export async function setMillParams(params) {
    return request(SETMILLPARAMS, METHOD.POST, params)
}

export async function redeemMill(params) {
    return request(REDEEMMILL, METHOD.POST, params)
}

export async function sendQuotaTranstion(params) {
    return request(SENDQUOTATRANSTION, METHOD.POST, params)
}

export async function setUPath(params) {
    return request(SETUPATH, METHOD.POST, params)
}

export async function batchRedeemMill(params) {
    return request(BATCHREDEEMILL, METHOD.POST, params)
}

export async function getBlockPlanList(params) {
    return request(GETBLOCKPLANLIST, METHOD.POST, params)
}

export async function rollbackBlock(params) {
    return request(ROLLBACKBLOCK, METHOD.POST, params)
}

export async function delBlockPlan(params) {
    return request(DELBLOCKPLAN, METHOD.POST, params)
}


export default {
    refresh,
    batchSendTranstion,
    sendQuotaTranstion,
    pledgeMill,
    batchSetMillFee,
    batchUpdatePwd,
    pledgeList,
    resetMill,
    deBlockMill,
    tradeList,
    setMillParams,
    redeemMill,
    setUPath,
    batchRedeemMill,
    getBlockPlanList,
    rollbackBlock,
    delBlockPlan,
}